part of "../json.dart";

/// 反序列化
extension Unserialize on JsonList {
  /// 传入一个反序列化的函数，就可以将List转化为List<T>
  List<T> unzip<T>(T Function(Json json) unserialze) {
    List<T> result = [];
    for (dynamic e in this) {
      final object = unserialze(e as Json);
      result.add(object);
    }
    return result;
  }
}
